#include <cstdio>
#include <cstdlib>
#include <ctime>
int main() {
	srand(time(NULL));
	int n(0);
	scanf("%d", &n);
	printf("%d\n", rand() % 5);
}
